    # = test.homepage.1.rb - Home , Home Page Test
    # 
    # See LICENSE.txt for licensing details.
    #
    # == Description
    # Here the links on the home page are verified
   require 'watir'
    include Watir
    require 'test/unit'
    require '../watir.config.rb'
    
	class TC_Homepage_test < Test::Unit::TestCase
	  def startup			
      @@ie = Watir::IE.start($SITE_URL)
	  end
	
	  def ie
      if defined? @@ie
        @@ie
      else
        startup
      end
	  end
	  
	  def test_01_verifyText
      assert(ie.contains_text(/Community Server/))		
    end
    
    def test_02_verifyLoginLinksExist
      if !(ie.link(:text, 'Sign in').exists?)
        ie.goto($SITE_URL + 'logout.aspx')
        ie.refresh
        ie.goto($SITE_URL)
        ie.refresh
      end
	  end
	  
    def test_03_verifyPageLinksExist
      assert(ie.link(:text, 'Sign in').exists?)
      assert(ie.link(:text, 'Join').exists?)
      assert(ie.link(:text, 'Help').exists?)
      #assert(ie.link(:id, /TitleBarSearchButton$/).exists?)
      assert(ie.link(:text, 'Home').exists?)
      assert(ie.link(:text, 'Blogs').exists?)
      assert(ie.link(:text, 'Forums').exists?)
      assert(ie.link(:text, 'Photos').exists?)
      assert(ie.link(:text, 'Downloads').exists?)
    end    
    
    def test_99_closeIE
      ie.close
    end
    
  end